package ee.propaganda.gparrot.client.view;

import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;

public class HeaderPanel extends Composite{
	
	public HeaderPanel(String logOutUrl, String email){
		//create header
		HorizontalPanel headerPanel = new HorizontalPanel();
		this.initWidget(headerPanel);
		Anchor logoutLink = new Anchor("Sign Out");
		logoutLink.setHref(logOutUrl);
		headerPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
		headerPanel.add(new Label(email));
		headerPanel.add(new Label(" | "));
		headerPanel.add(logoutLink);
		
	}
}
